package com.itheima.reggie.common;

//基于threadlocal封装工具类,获取当前线程的登录人员id
public class BaseContext {
    private static ThreadLocal<Long> threadLocal=new InheritableThreadLocal<>();

    public static void setCurrentId(Long id){
        threadLocal.set(id);
    }
    public static Long getCurrentId(){
        return threadLocal.get();
    }
}
